﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Athena.Core
{
    [Serializable()]
    public class GlobalSpecies : Species
    {
        public override bool Boundary
        {
            get { return true; }
            set { _Boundary = true; }
        }

        public override Athena.Objects.IDrawable Drawable
        {
            get
            {
                if (_Drawable == null)
                    GenerateDrawable(new System.Drawing.PointF());

                return _Drawable;
            }
            set
            {
                if (_Drawable == null)
                {
                    _Drawable = value;
                    if (_Drawable.Item != this) _Drawable.Item = this;
                }
                else
                    _Drawable.AddAlias(value);
            }
        }

        public override void GenerateDrawable(System.Drawing.PointF point)
        {
            Objects.EmptyGlyph glyph = new Objects.EmptyGlyph(point);
            glyph.Shape = Athena.Objects.SpeciesGlyph.SHAPE.Empty;
            _Drawable = glyph;
            _Drawable.Item = this;
        }

        public override object Clone()
        {
            return this;
        }

        public GlobalSpecies()
            : base()
        {
            Boundary = true;
        }
        public GlobalSpecies(string type, string name, double concentration)
            : base(type, name, concentration)
        {
            Concentration = concentration;
            Boundary = true;
        }
        public override void Remove()
        {            
        }
        
    }
}
